package com.candy.dao;

import java.util.*;

public class Test02 {
    public static void main(String[] args) {
//        int num=DBDriver2.update("INSERT INTO userinfo(username,userpwd,useraddress,usertel) VALUES(?,?,?,?)","赵小七","山东聊城","123456","13155698545");
//        System.out.println(num);
        test01();
    }
    public static void test01() {
        LinkedList<LinkedHashMap<String,Object>> datalist= DBDriver2.query4listMap("select * from employees where employee_id=?",1);
        for(HashMap<String,Object> hm:datalist){
//                对map进行曲所有的key值
            Set s=hm.keySet();
//                遍历所有key组成的set集合
            for (Object ob:s){
//                    打印key中，与通过key值取出的value（hm.get(ob)）
                System.out.print("key:"+ob+";value:"+hm.get(ob)+"\t");
            }
            System.out.println();
        }

    }
}
